﻿<navigation:Page 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
    xmlns:charting="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"         
    xmlns:chartingprimitives="clr-namespace:System.Windows.Controls.DataVisualization.Charting.Primitives;assembly=System.Windows.Controls.DataVisualization.Toolkit"  
    
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" x:Class="anael.About"
    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"
    Title="About" 
    Style="{StaticResource PageStyle}">
    
    <UserControl.Resources>
            <!-- styles -->
            <Style x:Key="PlotAreaStyle" TargetType="Grid">
                <Setter Property="Background" Value="Transparent"/>
            </Style>
        
            <Style x:Key="DataPointStyleCours" TargetType="Control">
                <Setter Property="Visibility" Value="Collapsed"/>
                <Setter Property="Background" Value="Green"/>
            </Style>

            <Style x:Key="GridLineStyle" TargetType="Line">
                <Setter Property="Stroke" Value="LightGray"/>
            </Style>

            <Style x:Key="DataPointStyle" TargetType="Control">
                <Setter Property="Visibility" Value="Collapsed"/>
            </Style>

            <ControlTemplate TargetType="charting:Chart" x:Key="ChartTemplate">
                <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="10">
                    <Grid x:Name="ChartRoot" Style="{TemplateBinding PlotAreaStyle}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <chartingprimitives:EdgePanel x:Name="ChartArea" Style="{TemplateBinding ChartAreaStyle}">
                            <Grid Grid.Column="0" x:Name="PlotArea" Canvas.ZIndex="-1" Style="{TemplateBinding PlotAreaStyle}" />
                            <Border Canvas.ZIndex="3" BorderBrush="#FF919191" BorderThickness="1" />
                        </chartingprimitives:EdgePanel>
                    </Grid>
                </Border>
            </ControlTemplate>

    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}">

            <StackPanel x:Name="ContentStackPanel">

                <TextBlock x:Name="HeaderText" Style="{StaticResource HeaderTextStyle}" 
                           Text="About"/>
                <TextBlock x:Name="ContentText" Style="{StaticResource ContentTextStyle}" 
                           Text="About page content"/>
                
                <Button Content="Calcul RN" Click="Button_Click"/>
                <Button Content="Test Motif" Click="Button_Click_1"/>

                <StackPanel x:Name="bottom_part" VerticalAlignment="Bottom" Orientation="Vertical">

                    <chartingToolkit:Chart x:Name="chart" Height="500" Title="Résultat">
                        <chartingToolkit:Chart.Series>
                            <chartingToolkit:ColumnSeries Title="Potentiel" IndependentValueBinding="{Binding ID}" DependentValueBinding="{Binding PotentialLevel}"/>
                        </chartingToolkit:Chart.Series>
                    </chartingToolkit:Chart>

                </StackPanel>
            </StackPanel>

        </ScrollViewer>
    </Grid>

</navigation:Page>